package com.cody.dao;

import com.cody.entity.Student;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Cody
 * @date 2021/4/6 - 20:27
 */
public interface StudentDao {
    List<Student> findAll();

    List<Student> queryAllStudent();

    /**
     * @param studentNumber
     * @param studentPassword
     * @return
     */
    Student querySingleStudent(@Param("studentNumber") String studentNumber, @Param("studentPassword") String studentPassword);

    List<Student> queryStudentByKeyword(@Param("Keyword") String keyword);

    Student querySingleStudentByStudentNumber(@Param("studentNumber") String studentNumber);

    boolean insertSingleStudent(@Param("student") Student student);

    boolean updateStudentInfo(@Param("student") Student student);

    boolean updateStudentPwd(@Param("studentNumber") String studentNumber, @Param("password") String password);

    boolean delStudentByStudentId(@Param("studentId") Integer studentId);
}
